package com.example.demo.alex.service.serviceImpl;

import com.example.demo.alex.mapper.RoleMapper;
import com.example.demo.alex.model.Role;
import com.example.demo.alex.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName RoleServiceImpl
 * @Description TODO
 * @Author zjg
 * @Date 2018/12/2516:41
 * @Version 2.0
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService {

    @Autowired(required = false)
    RoleMapper roleMapper;
    @Override
    public List<Role> findRoleByUserName(String userName) {
        return roleMapper.findRoleByUserName(userName);
    }

    @Override
    public List<Role> findRolesByResourceId(Long id) {
        return roleMapper.findRolesByResourceId(id);
    }
}
